<%@ page import="org.biojava.services.das.dao.RegistryUser" %>
<%@ page import="org.biojava.services.das.registry.UserManager" %>
<%@ page import="org.biojava.services.das.dao.Role" %>
<%@ page import="java.util.Date" %>


<% String title="DAS sources command";
   String header=title;
%>

<%@ include file="sangerheader.jsp" %>

<div id="main">

<p>
This page is part of the <a href="spec_1.53E.jsp">DAS 1.53E specification</a>
</p>

<h2>Documentation DAS - sources command</h2>

<p>
The DAS 1.53 specification provides a <a href="http://www.biodas.org/documents/spec.html#dsn">DSN command</a>
that returns the list of available data sources. Unfortunately this command did not scale well with the wide 
acceptance of DAS and it has become necessary to provide more meta-information for a DAS server.
</p>

<p>
In particular the following information for a DAS server is important:

<ul>
<li>The email address of the maintainer of a DAS source</li>
<li>The <a href="help_coordsys.jsp">coordiante system</a>(namespace) of the provided data</li>
<li>different properties that allow to describe a server closer</li>
</ul>
</p>


<hr>

<h3><a name="sources">Obtain the meta descripton of DAS sources on a server</a></h3>
  <br/>

<b>Version:</b> May 11th, 2006

<br/>

<b>Reference:</b>

<jsp:include page="reference.jsp"/>



<br/>

<b>Scope:</b> all DAS servers

<br/>

<b>Command:</b> <i>sources</i>

<br/>

<b>Format:</b>
<pre>

<i>PREFIX</i>/das[1]/sources

</pre>

The PREFIX can be either <b>das</b> or <b>das1</b> in order to refer to the major version 1 of the DAS protocol
and in order to provide support for the future das2 protocol.
<br/>
<br/>
<b>Description:</b> This query returns the meta information for a DAS server
<br/>
<b>Arguments:</b>
none
<br/>

<h4>Response:</h4>


<br/>

The response to the <i>sources</i> command is the "DASSSOURCE" XML-formatted document:
<blockquote>
<pre>
&lt;?xml version='1.0' encoding='UTF-8' ?&gt;
&lt;?xml-stylesheet type="text/xsl" href="das.xsl"?&gt;
&lt;SOURCES&gt;
 &lt;SOURCE uri="URI" title="title" doc_href="URL" description="description"&gt;
    &lt;MAINTAINER email="email address" /&gt;
    &lt;VERSION uri="URI" created="date"&gt;
      &lt;COORDINATES uri="uri" source="data type" authority="authority" test_range="ID">coordinate string&lt;/COORDINATES&gt;      
      &lt;CAPABILITY type="das1:command" query_uri="URL" /&gt;
      &lt;PROP name="key" value="value" /&gt;     
     &lt;/VERSION&gt;
   &lt;/SOURCE&gt;
&lt;/SOURCES>
</pre>
</blockquote>



<br/>
<b>Format:</b>
<%@ include file="sangertablestart.jsp" %>

<tr id="row2">
<td>xml-stylesheet</td>
<td>optional</td>
<td>an XSL stylesheet that e.g. allows a browser to nicely display the XML response </td>
</tr>

<tr id="row1">
<td>SOURCES</td>
<td>mandatory</td>
<td> the main container for several DAS sources</td>
</tr>

<tr id="row2">
<td>SOURCE</td>
<td>mandatory, one or many</td>
<td>the description for a DAS datasource</td>
</tr>

<tr id="row1">
<td>uri</td>
<td>mandatory</td>
<td>a unique URI for the DAS source</td>
</tr>

<tr id="row2">
<td>title, description</td>
<td>mandatory</td>
<td>the <i>nickname</i> under which a DAS server shall be known and displayed in a view.
The description is a free text description of the provided data</td>
</tr>

<tr id="row1">
<td>doc_href</td>
<td>optional</td>
<td>points to a web site where more information about a DAS source can get obtained.</td>
</tr>

<tr id="row2">
<td>MAINTAINER, email</td>
<td>mandatory</td>
<td>the email address of the maintainer of this DAS source.</td>
</tr>

<tr id="row1">
<td>VERSION</td>
<td>mandatory</td>
<td>in principle this would allow hosting several versions of a DAS sources (with unque uris) 
on a server, but in practise most people
provide only the server with the latest data. the created attribute provides the date on which a DAS server has been set up initially.
For a DAS registation server this is the date at which a DAS server has been pulished.
 </td>
</tr>



<tr id="row2">
<td>COORDINATES</td>
<td>mandatory, one or many</td>
<td>The description of the namespace of a DAS source. <br/>
<b>uri</b> - the unique URI for a DAS source. For a DAS registration server these
should be resolvable and allow to access more information about this. 
e.g. <a href="http://www.dasregistry.org/dasregistry/coordsys/CS_DS6">http://www.dasregistry.org/dasregistry/coordsys/CS_DS6</a>
for the UniProt,Protein Sequence coordinate system. <br/>

<b>source</b> - the data type. This refers to the "physical dimension" of the data. Currently the following categories are available:
Chromosome, Clone, Contig, Gene_ID, Supercontig, Protein Sequence, Protein Structure <br/>

<b>authority</b> - the authority, or institution that assigns the accession code for this namespace. In case of genome assemblies the authority that builds the assembly.

<b>version</b> - (optional) for genome assemblies the version of the build.<br/>
To learn more about coordinate systems, please see <a href="help_coords.jsp">here</a>.

</td>
</tr>

<tr id="row1">
<td>CAPABILTIY</td>
<td>mandatory, one or many</td>
<td>The supported DAS commmand<br/>
<b>type</b> - the type of the DAS command. to distinguish DAS/1 from DAS/2 servers <i>das1:</i> 
is used before the name of the command.<br/>
<b>query_uri</b>the URL of the server location, with the command attached. e.g. http://www.ebi.ac.uk/das-srv/uniprot/das/uniprot/features
Note: For some DAS commands this will not resolve, since e.g. for the features command the extension <pre>/features?segment=ID</pre> needs to be attached. 

</td>
</tr>

<tr id="row2">
<td>PROP</td>
<td>optional, one or many</td>
<td>a free key- value style property that allows to add more tags to a server</td>
</tr>

<%@ include file="sangertableend.jsp" %>

<b>Example Responses</b>

<ul>
<li> <a href="http://www.dasregistry.org/das1/sources">http://www.dasregistry.org/das1/sources</a> 
- the listing of DAS/1 sources at the DAS registration server</li>
<li> <a href="http://www.ensembl.org/das/sources">http://www.ensembl.org/das/sources</a> 
- the DAS sources provided by Ensembl. The DAS registration server uses this listing
to automatically update the registration for these DAS servers.</li>
<li> <a href="http://vega.sanger.ac.uk/das/sources">http://vega.sanger.ac.uk/das/sources</a> 
- the VEGA DAS sources</li>
</ul>


<%@ include file="sangerfooter.jsp" %>
